package com.neusoft.elmboot.controller;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.service.EditablePropertiesService;

/**
*@author chj
*@date 2024年10月24日
*/
@RestController
@RequestMapping("/EditableProperties")
public class EditablePropertiesController {

	@Autowired
	private EditablePropertiesService editablePropertiesService;

	@PutMapping("/REFILLBONUS")
	public int updateREFILLBONUS(BigDecimal num){
		return editablePropertiesService.updateREFILLBONUS(num);
	}

	@PutMapping("/SURCHARGE")
	public int updateSURCHARGE(BigDecimal num) {
		return editablePropertiesService.updateSURCHARGE(num);
	}

	@PutMapping("/OVERDRAFT_MAX_AMOUNT")
	public int updateOVERDRAFT_MAX_AMOUNT(BigDecimal num) {
		return editablePropertiesService.updateOVERDRAFT_MAX_AMOUNT(num);
	}

	@GetMapping("/REFILLBONUS")
	public BigDecimal getREFILLBONUS(){
		return editablePropertiesService.getREFILLBONUS();
	}

	@GetMapping("/SURCHARGE")
	public BigDecimal getSURCHARGE(){
		return editablePropertiesService.getSURCHARGE();
	}

	@GetMapping("/OVERDRAFT_MAX_AMOUNT")
	public BigDecimal getOVERDRAFT_MAX_AMOUNT() {
		return editablePropertiesService.getOVERDRAFT_MAX_AMOUNT();
	}

}
